//--------------------------------------------------------------------------
// 
//  Copyright (c) Christian Liensberger.  All rights reserved. 
// 
//  Licensed under GPL v2. See official license for details.
// 
//--------------------------------------------------------------------------

using System;
using System.IO;

namespace Chili.Imagizer
{
	/// <summary>
	/// The EventArgs used by the event fired by the ImagesLoader class.
	/// </summary>
	public sealed class ImageProcessingEventArgs : EventArgs
	{
		private FileInfo _file;
		private int _index;
		private int _count;

		/// <summary>
		/// Creates a new instance of the ImageFoundEventArgs Class.
		/// </summary>
		/// <param name="file">The file that is processed.</param>
		/// <param name="index">The index of the given file.</param>
		/// <param name="count">The amount of files being processed.</param>
		internal ImageProcessingEventArgs(FileInfo file, int index, int count)
		{
			if (file == null)
				throw new ArgumentNullException("file");

			_file = file;
			_index = index;
			_count = count;
		}

		/// <summary>
		/// Gets the file that is currently processed.
		/// </summary>
		public FileInfo File
		{
			get { return _file; }
		}

		/// <summary>
		/// Gets the index of the given file.
		/// </summary>
		public int Index
		{
			get { return _index; }
		}

		/// <summary>
		/// Gets the amount of files that are processed.
		/// </summary>
		public int Count
		{
			get { return _count; }
		}
	}
}
